import request from "@/utils/request"

// 获取购物车列表
export const reqCartList = (userId:string) => request.get<any,any>(`/shopcarts/${userId}`)

// 删除购物车
export const deleteCart = (data:any) => request.post<any,any>('/shopcarts/delete',data)

// 添加购物车
export const addCart = (data:any) => request.post<any,any>('/shopcarts',data)

// 获取购物车总额
export const reqTotalAmount = (data:any) => request.post<any,any>('/shopcarts/totalPay',data)

// 更新购物车商品数量
export const updateCart = (data:any) => request.put<any,any>('/shopcarts',data)